package com.mapaoer.user.entity;

import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableField;
import java.time.LocalDateTime;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 技能标签实体类
 * 表示开发者的技能标签，如Java、Spring Boot、React等
 */
@Data
@TableName("skill_tag")
public class SkillTag {

    @TableId(type = IdType.AUTO)
    private Long id;

    // 技能名称
    @TableField(nullable = false, unique = true)
    private String name;

    // 技能类别：LANGUAGE(编程语言), FRAMEWORK(框架), TOOL(工具), PLATFORM(平台), DATABASE(数据库), OTHER(其他)
    private SkillCategory category;

    // 标签颜色
    private String color;

    // 是否热门标签
    private Boolean isHot;

    // 创建时间
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    // 更新时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    // 技能类别枚举
    public enum SkillCategory {
        LANGUAGE, FRAMEWORK, TOOL, PLATFORM, DATABASE, OTHER
    }

    // 手动添加setter方法
    public void setName(String name) {
        this.name = name;
    }

    public void setCategory(SkillCategory category) {
        this.category = category;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public void setColor(String color) {
        this.color = color;
    }
}